cmake_minimum_required(VERSION 3.27)
project(yolov11_cpp)
set(CMAKE_CXX_STANDARD 17)


option(HOME "use libtorch code" ON)
if(HOME)
    include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include")
    include_directories ("D:/opencv455_cuda/install/include")
    include_directories ("D:/opencv455_cuda/install/include/opencv2")
    include_directories ("D:/libtorch260/include")
    include_directories ("D:/libtorch260/include/torch/csrc/api/include")

    link_libraries("D:/opencv455_cuda/install/x64/vc16/lib/opencv_core455.lib")
    link_libraries("D:/opencv455_cuda/install/x64/vc16/lib/opencv_imgcodecs455.lib")
    link_libraries("D:/opencv455_cuda/install/x64/vc16/lib/opencv_imgproc455.lib")
    link_libraries("D:/opencv455_cuda/install/x64/vc16/lib/opencv_highgui455.lib")


    set(SOURCE_FILES
            include/model.h
            include/utils.h
            include/dataset.h
            include/model_util.h
            src/utils.cpp
            src/main.cpp
            src/dataset.cpp
    )
    add_executable(yolov11_cpp ${SOURCE_FILES})
else()
    include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/include")

    include_directories ("E:/opencv452_cuda/install/include")
    include_directories ("E:/opencv452_cuda/install/include/opencv2")
    include_directories ("E:/libtorch251_debug/include")
    include_directories ("E:/libtorch251_debug/include/torch/csrc/api/include")

    link_libraries("E:/opencv452_cuda/install/x64/vc16/lib/opencv_core452.lib")
    link_libraries("E:/opencv452_cuda/install/x64/vc16/lib/opencv_imgcodecs452.lib")
    link_libraries("E:/opencv452_cuda/install/x64/vc16/lib/opencv_imgproc452.lib")
    link_libraries("E:/opencv452_cuda/install/x64/vc16/lib/opencv_highgui452.lib")


    set(SOURCE_FILES
            include/model.h
            include/utils.h
            src/utils.cpp
    )
    add_executable(yolov11_cpp ${SOURCE_FILES})
endif()